export default {
    namespaced: true,
    state: {
        form: {
            category: "",
            name: "",
            urls: "",
            level: "0", //菜单级别
            father: [], //选择父菜单
        },
        temporaryFatherData: [] //树状菜单列表
    },
    mutations: {
        //清除数据
        clearForm(state) {
            state.form = {
                category: "",
                name: "",
                urls: "",
                level: "0", //菜单级别
                father: [], //选择父菜单
            }
        },
        resetFormAll(state) {
            state.form = {
                category: "",
                name: "",
                urls: "",
                level: "0", //菜单级别
                father: [], //选择父菜单
            },
                state.temporaryFatherData = [] //树状菜单列表
        },

        //更新菜单信息
        updateTemporaryFatherData(state,data){
            state.temporaryFatherData = data
        },
    }
}